﻿@model PageList<TrainGroup>
<table class="table table-striped table-bordered table-hover table-manage">
    <thead>
        <tr>
            <th class="text-center " data-order="@nameof(TrainGroup.Name)">培训计划名称</th>
            <th class="text-center" data-order="@nameof(TrainGroup.SchoolId)">培训机构</th>
            <th class="text-center w200px" data-order="@nameof(TrainGroup.CategoryId)">从业类别</th>
            <th class="text-center">开班日期</th>
            <th class="text-center w100px" data-order="@nameof(TrainGroup.PlanNum)">计划人数</th>
            <th class="text-center w100px" data-order="@nameof(TrainGroup.Num)">预约人数</th>
            <th class="text-center w70px" data-order="@nameof(TrainGroup.Status)">状态</th>
            <th class="text-center w130px">操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var record in Model)
        {
            <tr>
                <td class="text-center ">
                    <a class="uiwindow" data-url="@Url.Action("Details", new {id = record.Id})">
                        @record.Name
                    </a>
                </td>
                <td class="text-center">@record.SchoolName</td>
                <td class="text-center">@record.CategoryName</td>
                <td class="text-center">
                    @DateTimeHelper.FormatDate(record.StartDate)
                    至 
                    @DateTimeHelper.FormatDate(record.EndDate)
                </td>
                <td class="text-center">@record.PlanNum</td>
                <td class="text-center">@record.Num</td>
                <td class="text-center">
                    @(record.Status == 0 ? Html.LabelWarning(record.StatusName) : Html.LabelSuccess(record.StatusName))
                </td>
                <td class="text-center">
                    <a class="uiwindow"
                       data-url="@Url.Action("Reservation", new {id = record.Id})">
                        预约
                    </a>
                    <text>&nbsp;</text>
                    <a class="color-primary uimodal" data-toggle="tooltip"
                       data-url="@Url.Action("Edit", new {id = record.Id})"
                       title="编辑">
                        编辑
                    </a>
                    @if (record.Status == 0)
                    {
                        <text>&nbsp;</text>
                        <a class="color-danger tsdelete" data-toggle="tooltip"
                           data-url="@Url.Action("Delete", new {id = record.Id})"
                           title="删除">
                            删除
                        </a>
                    }
                </td>
            </tr>
        }
    </tbody>
</table>
@Html.RenderPages(Model)